<%-- 
    Document   : showannouncements
    Created on : Jun 3, 2012, 10:08:18 PM
    Author     : FRIENDS
--%>

<%@page import="AO.Announcement" contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"[]>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en">
<head>
    
  <title>Post</title>
  <link rel="stylesheet" href="./css/poststyle.css" type="text/css" media="screen" />
  <script  src="./js/courseactions.js" ></script>
</head>
    <body>
        <div id="art-page-background-glare-wrapper">
    <div id="art-page-background-glare"></div>
</div>
        <%
        String[] ids=helper.Announcement.getMyAnnouncementIds(((AO.Login)(request.getSession().getAttribute("logindata"))).getUserid(),true);
         
         
         String userid=((AO.Login)(session.getAttribute("logindata"))).getUserid();
         if(ids!=null)
         for(int i=0;i<ids.length;i++)
            {
            Announcement announce=helper.Announcement.getAnnouncementBean(ids[i]);
          %>
<div id="art-main">
    <div class="cleared reset-box"></div>
    <div class="art-box art-sheet">
        <div class="art-box-body art-sheet-body">
            <div class="art-layout-wrapper">
                <div class="art-content-layout">
                    <div class="art-content-layout-row">
                        <div class="art-layout-cell art-content">
<div class="art-box art-post">
    <div class="art-box-body art-post-body">
<div class="art-post-inner art-article">
                                <div class="art-postmetadataheader">
                                        <h2 class="art-postheader"><%=announce.getSubject()%>
                                       
                                        </h2>
                                        
                                        
                                                                                     <div class="art-postheadericons art-metadata-icons">
                        <span class="art-postdateicon"><%=announce.getAnnouncedate()%></span> | <span class="art-postauthoricon">Author <a href="#" title=""><%=announce.getAuthor()%></a></span> | 
                            <%
                            if(announce.getCatagory().equals("newcourse"))
                                  {if(helper.course.subscribeStatus(userid,announce.getCourseid()).equals("notadded")) 
                                  {%> 
                                  <span class="art-postediticon"><div id="<%=announce.getCourseid()%>" class="join" title="join in course" onclick="addCourse(this.id)" >Join This Course</div></span>
                                  <%}
                                  else if(helper.course.subscribeStatus(userid,announce.getCourseid()).equals("added"))
                                          {%><span class="art-postediticon"> <div class="join">already added</div></span>
                                  <%} }%>
                            
                                    
                    </div> 
                                 
                                </div>
                                <div class="art-postcontent">
         <%=announce.getDescription()%>
                </div>
                <div class="cleared"></div>
                                              </div>

		<div class="cleared"></div>
    </div>
</div>

                          <div class="cleared"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="cleared"></div>
            
    		<div class="cleared"></div>
        </div>
    </div>
    
</div>


<% } %>
    </body>
</html>
 